<template>
  <div class="hello">
    <h1>版本：08</h1>
    <h1>/boot-web/http/params/path/1返回结果：</h1>
    <p>{{ bootWebResp }}</p>
    <h1>/cloud-web-01/feign01/test/req/resp/demo-vo返回结果：</h1>
    <p>{{ cloudWeb01Resp.name }}</p>
    <h1>/cloud-web-02/feign02/test/req/resp/demo-vo返回结果：</h1>
    <p>{{ cloudWeb02Resp.name }}</p>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      bootWebResp: "",
      cloudWeb01Resp: {},
      cloudWeb02Resp: {}
    }
  },
  created () {
    // `this` 指向 vm 实例
    console.log('a is: ' + this.a)

    this.axios.get('/boot-web/http/params/path/1?msg=参数&name=姓名')
    .then((response) => {
      console.log(response.data)
      this.bootWebResp = response.data.data
    })

    this.axios.post('/cloud-web-01/feign01/test/req/resp/demo-vo', {
      "id": 1,
      "age": 1,
      "name": "姓名1",
      "date": "2022-01-01 01:01:01",
      "localDate": "2022-01-01",
      "localDateTime": "2022-01-01 01:01:01"
    }).then((response) => {
      console.log(response.data)
      this.cloudWeb01Resp = response.data.data
    })

    this.axios.post('/cloud-web-02/feign02/test/req/resp/demo-vo', {
      "id": 2,
      "age": 2,
      "name": "姓名2",
      "date": "2022-02-02 02:02:02",
      "localDate": "2022-02-02",
      "localDateTime": "2022-02-02 02:02:02"
    }).then((response) => {
      console.log(response.data)
      this.cloudWeb02Resp = response.data.data
    })

  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
